#include <iostream>
#include <cstdio>
using namespace std;
int a, b;
int main() {
	freopen("reverse.in", "r", stdin);
	freopen("reverse.out", "w", stdout);
	cin >> a;
	while(a) {
		b = b * 10 + a % 10;
		a /= 10;
	}
	cout << b;
}
